﻿<local:DocumentBase x:Class="WPFExcelReport.YCAFSSTAMM"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
        xmlns:wep="clr-namespace:WPFExcelReport"
       Height="700" Width="1024" 
       Background="White" 
         Loaded="Window_Loaded"
        Title="YCAFSSTAMM"  
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="150*" />
            <RowDefinition Height="200*" />
            <RowDefinition Height="50*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100*"></ColumnDefinition>
            <ColumnDefinition Width="100*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.ColumnSpan="2" Orientation="Vertical" Margin="0,0,0,65">
            <WrapPanel Width="1023" Height="38">
                <Label Content="类别编号："    Width="82" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtARTTYPE" Width="39" Margin="10,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="0" Text="FC"
                         KeyUp="txtART_KeyUp"  CharacterCasing="Upper" Background="Pink" MaxLength="3" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="款号："    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtARTICLE" Width="170" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="1"
                         Focusable="True" KeyUp="txtART_KeyUp" Background="YellowGreen" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="年份："    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtCOLL" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="4" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="波段："    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtREASON" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="3"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="3" FontSize="18" Foreground="#FF141111" Height="33" />

            </WrapPanel>
        </StackPanel>
        <StackPanel Grid.ColumnSpan="2" Orientation="Vertical" Margin="0,37,0,28">
            <WrapPanel Width="1023">
                <Label Content="大类："    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtPRDGRP" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="4"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="3" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="小类："    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtARTGRP" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="5"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="4" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="材质："    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtMATERIAL" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="6"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="3" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="采购员："    Width="72" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtPURCHASER" Width="148" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="7"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="8" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="尺码组："    Width="72" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtSIZE" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="8"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="3" FontSize="18" Foreground="#FF141111" Height="33" />
            </WrapPanel>
        </StackPanel>
        <StackPanel Margin="0,72,0,0" Grid.RowSpan="4" Grid.ColumnSpan="2">
            <WrapPanel >
                <Label Content="国家标准："    Width="83" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtSTANDARD" Width="171" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="9"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="18" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="安全类别："    Width="84" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtSAFTY" Width="111" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="10"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="9" FontSize="18" Foreground="#FF141111" Height="33" />
                <Button Content="查询款式资料" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="122" Panel.ZIndex="8"
                        Click="btnQuery_Click"/>
                <Button Content="导出款式资料" Height="33" Margin="10,0,0,0"  Name="btnEXCEL" Width="122" Panel.ZIndex="9"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
            <WrapPanel>
                <fd:FilteringDataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  Width="1000"
                  Height="600"
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                               IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding}" x:Name="MasterDg" 
                               Grid.ColumnSpan="2" Margin="0,10,0,0" Grid.RowSpan="3" Grid.Row="1">
                    /*STYLE	STYLENAME	COLORNAME	SIZENAME	SALESPRICE	COSTPRICE	TYPE	TYPENAME	COLL	REASON	
        REASONNAME	PRDGROUP	PRDGRPNAME	ARTGROUP	ARTGRPNAME	MATERIAL	MATERIALNAME	COUNTRYSTANDARD	SAFTYNAME	
                    UNIT	CONTDATE	MARKDATE	PURCHASER   FSGRRAS   */
                    <fd:FilteringDataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=style}" Header="款号" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=stylename}" Header="款号描述" Width="SizeToCells" MinWidth="70" />
                        <DataGridTextColumn Binding="{Binding Path=colorname}" Header="颜色" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=sizename}" Header="尺码" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=salesprice}" Header="销售价" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=costprice}" Header="成本价" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=type}" Header="类型" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=typename}" Header="类型名称" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=coll}" Header="年份" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=reason}" Header="季节" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=reasonname}" Header="季节名称" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=prdgroup}" Header="大类" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=prdgrpname}" Header="大类名称" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=artgroup}" Header="小类" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=artgrpname}" Header="小类名称" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=material}" Header="材质" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=materialname}" Header="材质名称" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=countrystandard}" Header="国家标准" Width="SizeToCells" MinWidth="80" />
                        <DataGridTextColumn Binding="{Binding Path=saftyname}" Header="安全类型" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=contdate}" Header="合同日期" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=markdate}" Header="上市日期" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=purchaser}" Header="采购员" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=fsgrras}" Header="尺码组" Width="SizeToCells" MinWidth="30" />
                    </fd:FilteringDataGrid.Columns>
                </fd:FilteringDataGrid  >
            </WrapPanel>
        </StackPanel>
    </Grid>
</local:DocumentBase>
